<me:UIABF x:Class="WPFExcelReport.TAB05AV12"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL"  
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"  
                    xmlns:AP="clr-namespace:WPFExcelReport;assembly=TAPKOPF"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIABF.Resources>
        <CollectionViewSource   x:Key="vwMaster" />
        <ucd:PNumConverter x:Key="pnum"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:NOTConverter x:Key="not"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby480  x:Key="shift"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby10000 x:Key="dw"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:SDKEYCONV x:Key="sd"/>
    </me:UIABF.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0">
            <WrapPanel Grid.Column="0">
                <Button Grid.Column="1" Height="20"  Width="Auto" Margin="10,0,0,0"  Click="NewCommand" Content="{Binding Source={Localization:Translate Word=回修}}"/>
                <TextBlock Margin="10,0,0,0" Text="{Binding Source={Localization:Translate Word=原因}}"/>
                <SD:K0249 KEY="{Binding REWEIL,ElementName=TV}"/>
                <ex:NumericBox Margin="10,0,0,0" Text="{Binding QTY,ElementName=TV}" DecimalPlaces="0" Width="60"/>
                <TextBlock Margin="10,0,0,0" Text="{Binding Source={Localization:Translate Word=M}}"/>
            </WrapPanel>
        </StackPanel>
        <DataGrid  Grid.Row="1" CanUserReorderColumns="True"   Grid.Column="0" 
                          CanUserResizeRows="True" CanUserSortColumns="True"                  
                          AutoGenerateColumns="False"   
                          EnableRowVirtualization="True"  
                          RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                          IsSynchronizedWithCurrentItem="True" Visibility="Visible"
                          ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
                          x:Name="dlgMaster" 
                  >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=ABFAUFKRS}" Header=" "  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFAUFLFD, Converter={StaticResource ResourceKey=pnum}}" Header="{Binding Source={Localization:TranslateExtension Word=生产单}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFAUFPOS, Converter={StaticResource ResourceKey=pnum}}" Header=" "  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFAFOLGE}" Header="{Binding Source={Localization:Translate Word=步骤}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFISTARTDAT}" Header="{Binding Source={Localization:TranslateExtension Word= 开始}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFISTARTZT}" Header="{Binding Source={Localization:TranslateExtension Word=时间}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFMTYP }" Header="{Binding Source={Localization:Translate Word=设备类型}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFAGANG, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=操作 }}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFBZAGANG, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=操作}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFREAUFKRS}" Header=" "  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFREAUFLFD, Converter={StaticResource ResourceKey=pnum}}" Header="{Binding Source={Localization:TranslateExtension Word=返修单}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFREAUFPOS, Converter={StaticResource ResourceKey=pnum}}" Header=" "  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABPREWEIL, Converter={StaticResource ResourceKey=sd}, ConverterParameter=0249}" Header=" "  Width="Auto" /> 
                <DataGridTextColumn Binding="{Binding Path=ABFMNRKRS}" Header=" "  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFMLFDNR}" Header="{Binding Source={Localization:Translate Word=机台}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=ABFMPOS}" Header=" "  Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</me:UIABF>
